/**
 * jims
 */
package com.jims.master.modules.drug.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import org.hibernate.validator.constraints.Length;

import java.beans.Transient;
import java.util.Date;

/**
 * 入库记录详情Entity
 * @author zhuq
 * @version 2017-03-16
 */
public class DrugImportDetail extends DataEntity<DrugImportDetail> {
	
	private static final long serialVersionUID = 1L;
	private String masterId;		// 主表Id
	private String itemNo;		// 序号
	private String drugCode;		// 药品编码
	private String infoId;		// drugInfoId
	private String packageNum;		// 包装数量
	private String packageSpec;		// 包装规格
	private String packageUnits;		// 包装单位
	private String minSpec;		// 最小规格
	private String minUnits;		// 最小单位
	private String purchasePrice;		// 进货价
	private String discount;		// 折扣
	private String batchNo;		// 批号
	private Date expireDate;		// 有效期
	private String quantity;		// 小包装库存量
	private String location;		// 货位
	private String invoiceNo;		// 发票号
	private Date invoiceDate;		// 创建时间
	private  String drugName; //药品名称
    private String storageId; //库房Id

    public String getStorageId() {
        return storageId;
    }

    public void setStorageId(String storageId) {
        this.storageId = storageId;
    }

    //    扩展
    private String tradePrice; //进货价
    private String retailPrice;//零售价
    private String importClass;//入库类别
    private Date importDate;//入库日期
    private String documentNo;//出库单号
    private String supplierJc;//发货公司
    private String storageName;//收货单位
    private String storageForm;//发货单位
    private int index;//序号
    private int num;//品种数量
    @Transient
    public int getNum() {
        return num;
    }
    @Transient
    public void setNum(int num) {
        this.num = num;
    }
    @Transient
    public String getTradePrice() {
        return tradePrice;
    }
    @Transient
    public void setTradePrice(String tradePrice) {
        this.tradePrice = tradePrice;
    }
    @Transient
    public String getRetailPrice() {
        return retailPrice;
    }
    @Transient
    public void setRetailPrice(String retailPrice) {
        this.retailPrice = retailPrice;
    }
    @Transient
    public String getImportClass() {
        return importClass;
    }
    @Transient
    public void setImportClass(String importClass) {
        this.importClass = importClass;
    }
    @Transient
    public Date getImportDate() {
        return importDate;
    }
    @Transient
    public void setImportDate(Date importDate) {
        this.importDate = importDate;
    }
    @Transient
    public String getDocumentNo() {
        return documentNo;
    }
    @Transient
    public void setDocumentNo(String documentNo) {
        this.documentNo = documentNo;
    }
    @Transient
    public String getSupplierJc() {
        return supplierJc;
    }
    @Transient
    public void setSupplierJc(String supplierJc) {
        this.supplierJc = supplierJc;
    }
    @Transient
    public String getStorageName() {
        return storageName;
    }
    @Transient
    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }
    @Transient
    public String getStorageForm() {
        return storageForm;
    }
    @Transient
    public void setStorageForm(String storageForm) {
        this.storageForm = storageForm;
    }
    @Transient
    public int getIndex() {
        return index;
    }
    @Transient
    public void setIndex(int index) {
        this.index = index;
    }


    private String createDateStr;
    private String updateDateStr;

    @Transient
    public String getCreateDateStr() {
        return createDateStr;
    }

    @Transient
    public void setCreateDateStr(String createDateStr) {
        this.createDateStr = createDateStr;
    }

    @Transient
    public String getUpdateDateStr() {
        return updateDateStr;
    }

    @Transient
    public void setUpdateDateStr(String updateDateStr) {
        this.updateDateStr = updateDateStr;
    }

    @Transient
	public String getDrugName() {
		return drugName;
	}
	@Transient
	public void setDrugName(String drugName) {
		this.drugName = drugName;
	}
	public DrugImportDetail() {
		super();
	}

	public DrugImportDetail(String id){
		super(id);
	}

	@Length(min=1, max=64, message="主表Id长度必须介于 1 和 64 之间")
	public String getMasterId() {
		return masterId;
	}

	public void setMasterId(String masterId) {
		this.masterId = masterId;
	}
	
	@Length(min=0, max=4, message="序号长度必须介于 0 和 4 之间")
	public String getItemNo() {
		return itemNo;
	}

	public void setItemNo(String itemNo) {
		this.itemNo = itemNo;
	}
	
	@Length(min=1, max=32, message="药品编码长度必须介于 1 和 32 之间")
	public String getDrugCode() {
		return drugCode;
	}

	public void setDrugCode(String drugCode) {
		this.drugCode = drugCode;
	}
	
	@Length(min=1, max=64, message="drugInfoId长度必须介于 1 和 64 之间")
	public String getInfoId() {
		return infoId;
	}

	public void setInfoId(String infoId) {
		this.infoId = infoId;
	}
	
	@Length(min=0, max=8, message="包装数量长度必须介于 0 和 8 之间")
	public String getPackageNum() {
		return packageNum;
	}

	public void setPackageNum(String packageNum) {
		this.packageNum = packageNum;
	}
	
	@Length(min=1, max=20, message="包装规格长度必须介于 1 和 20 之间")
	public String getPackageSpec() {
		return packageSpec;
	}

	public void setPackageSpec(String packageSpec) {
		this.packageSpec = packageSpec;
	}
	
	@Length(min=1, max=2, message="包装单位长度必须介于 1 和 2 之间")
	public String getPackageUnits() {
		return packageUnits;
	}

	public void setPackageUnits(String packageUnits) {
		this.packageUnits = packageUnits;
	}
	
	@Length(min=1, max=20, message="最小规格长度必须介于 1 和 20 之间")
	public String getMinSpec() {
		return minSpec;
	}

	public void setMinSpec(String minSpec) {
		this.minSpec = minSpec;
	}
	
	@Length(min=1, max=2, message="最小单位长度必须介于 1 和 2 之间")
	public String getMinUnits() {
		return minUnits;
	}

	public void setMinUnits(String minUnits) {
		this.minUnits = minUnits;
	}
	
	public String getPurchasePrice() {
		return purchasePrice;
	}

	public void setPurchasePrice(String purchasePrice) {
		this.purchasePrice = purchasePrice;
	}
	
	public String getDiscount() {
		return discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}
	
	@Length(min=1, max=64, message="批号长度必须介于 1 和 64 之间")
	public String getBatchNo() {
		return batchNo;
	}

	public void setBatchNo(String batchNo) {
		this.batchNo = batchNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getExpireDate() {
		return expireDate;
	}

	public void setExpireDate(Date expireDate) {
		this.expireDate = expireDate;
	}
	
	@Length(min=0, max=8, message="小包装库存量长度必须介于 0 和 8 之间")
	public String getQuantity() {
		return quantity;
	}

	public void setQuantity(String quantity) {
		this.quantity = quantity;
	}
	
	@Length(min=0, max=64, message="货位长度必须介于 0 和 64 之间")
	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}
	
	@Length(min=0, max=64, message="发票号长度必须介于 0 和 64 之间")
	public String getInvoiceNo() {
		return invoiceNo;
	}

	public void setInvoiceNo(String invoiceNo) {
		this.invoiceNo = invoiceNo;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInvoiceDate() {
		return invoiceDate;
	}

	public void setInvoiceDate(Date invoiceDate) {
		this.invoiceDate = invoiceDate;
	}
	
}